package com.zl.learning.thread.timer;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class TestScheduledThreadPoolExecutor {

    public static void main(String[] args) {
        ScheduledThreadPoolExecutor executor = (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(10);
        executor.scheduleAtFixedRate(() -> System.out.println("aaaa"), 100,10000, TimeUnit.MILLISECONDS);
    }


}
